<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .small-picture>li>img{
            width: 100px;
            height: 100px;
            margin: 0 auto;
            align-self: center;
            cursor: pointer;
        }
        .small-picture li{
            list-style: none;
            
        }
        .small-picture{
            display: flex;
        }
        .box{
            width: 1200px;
            height: 800px;
            display: flex;
            justify-content: center;
        }
        body{
            background: url(image/1.jpeg) no-repeat;
            float: left;
        }
    </style>
</head>

<body>
    <div class="box">
    <ul class="small-picture">
        <li><img src="image/1.jpeg" alt=""></li>
        <li><img src="image/2.jpeg" alt=""></li>
        <li><img src="image/3.jpeg" alt=""></li>
        <li><img src="image/4.jpeg" alt=""></li>
    </ul>
</div>
    <script>
        
        let imgList = document.querySelectorAll('.small-picture>li>img');
        for(let i in imgList){
            imgList[i].onclick = function(){
                 //console.log(this.src);
                document.body.style.background = 'url(' + this.src+ ') no-repeat';
                 //bg.style.background = 'url'+(this.src)+'no-repeat';
            }
        }
    </script>
</body>

</html>